package com.ibeeking.found.open.b.rest.service;

import com.ibeeking.found.open.api.common.dto.CouponInfoDTO;
import com.ibeeking.found.open.api.common.dto.CouponTypeListDTO;
import com.ibeeking.found.open.api.common.dto.MemberCouponSuperpositionDTO;
import com.ibeeking.found.open.api.common.query.CouponInfoQuery;
import com.ibeeking.found.open.service.common.dto.CouponVerificationChannelListDTO;
import com.ibeeking.found.open.service.common.param.CouponVerificationQRParam;
import com.ibeeking.found.open.service.common.query.CouponLockQuery;
import com.ibeeking.found.open.service.common.query.CouponSuperpositionQuery;
import com.ibeeking.found.open.service.common.query.CouponUnLockQuery;
import com.ibeeking.found.open.service.common.query.CouponVerificationQuery;

import java.util.List;

/**
 * @ClassName ICouponService
 * @Description
 * @Author ibeeking
 * @Date 2021-06-15 11:17
 **/
public interface ICouponService {

    /**
     * 查询券类型
     *
     * @return
     */
    List<CouponTypeListDTO> couponType();

    /**
     * 查询券核销渠道
     * @return
     */
    List<CouponVerificationChannelListDTO> verificationChannel();

    /**
     * 查询券详情
     *
     * @param couponCode
     * @return
     */
    CouponInfoDTO queryCouponInfoByCouponCode(Long couponCode);

    /**
     * 锁券
     *
     * @param query
     * @return
     */
    Boolean couponLock(CouponLockQuery query);

    /**
     * 解锁券
     *
     * @param query
     * @return
     */
    Boolean couponUnLock(CouponUnLockQuery query);

    /**
     * 核销券
     *
     * @param query
     * @return
     */
    Boolean couponVerification(CouponVerificationQuery query);

    /**
     * 券码核销
     * @param param
     * @return
     */
    Boolean verificationCouponByQR(CouponVerificationQRParam param);

    /**
     * 查询券详情
     *
     * @param query
     * @return
     */
    CouponInfoDTO queryCouponInfo(CouponInfoQuery query);

    /**
     * 通过券码查询
     *
     * @param marketCode
     * @param query
     * @return
     */
    CouponInfoDTO couponInfoById(String marketCode, CouponInfoQuery query);

    /**
     * 核销
     *
     * @param marketCode
     * @param param
     * @return
     */
    Boolean verificationById(String marketCode, CouponVerificationQRParam param);

    /**
     * 会员优惠券可用叠加查询校验
     *
     * @param query
     * @return
     */
    MemberCouponSuperpositionDTO superposition(CouponSuperpositionQuery query);
}
